<?php
class Wow_Armory_Realm
{

    /**
     * Contains the realm name as a string.
     * 
     * @var string
     */
    protected $_realmName = null;
    
    /**
     * Creates the object.
     * 
     * @throws Wow_Armory_Exception '' - 1013
     * @param  string $realm
     * @return void
     */
    public function __construct($realm)
    {
        if (!is_string($realm)
            || empty($realm)
        ) {
            throw new Wow_Armory_Exception('', 1013);
        }
        
        $this->_realmName = $realm;
    }
    
    /**
     * Returns the realm name as a string.
     * 
     * @return string
     */
    public function getRealmName()
    {
        return $this->_realmName;
    }
    
    /**
     * Gets the parsed realm name.
     * 
     * @return string
     */
    public function getRealmNameParsed()
    {
        return str_replace(' ', '+', $this->_realmName);
    }
    
}